<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <title>测试</title>
</head>
<body>
<div id="test"></div>
</body>
<script type="text/javascript">
    function sayHello() {
        $.ajax({
            url: 'http://172.16.5.70:8888/login',
            data: {username: 'xiang.wang', password: '111'},
            type: 'post',
            success: function (result) {
                console.log(result);
            },
            error:function(msg){
                console.log(msg);
            }
        });
    }

    $(document).ready(function(){
        sayHello();
    });
</script>
<div>
    test
</div>
</html>